/**
 * Created by Jerry on 2017/12/11.
 */
import MainMap from 'page/main_map'
import DeviceList from 'page/device_list'
import DeviceConfig from 'page/device_config'
import DeviceAdd from 'page/device_add'
import railList from 'page/rail_list'
import WarnLog from 'page/warn_log'

//rid用于标明路由在整个层级结构中的位置，方便右上方标题层级显示

 export  const routes=[
    {path:'/main/map',rid:'1-1',component:MainMap},
    {path:'/device/list',rid:'2-1',component:DeviceList},
     {path:'/device/config/:uid',rid:'2-1-3',component:DeviceConfig},
     {path:'/device/add',rid:'2-1-1',component:DeviceAdd},
     {path:'/rail/list',rid:'3-1',component:railList},
     {path:'/warn/log',rid:'4-1',component:WarnLog},

]

export const navList=[
    {
      id:1,
      name:'监控管理',
      sub:[
          {  //如有children，左边不展示，但需加路由，eg:1-1-1
            id:1,
            name:'地图显示',
            router:'/main/map'
          },
      ]
    },
    {
     id:2,
     name:'设备账号管理',
        sub:[
            {
                id:1,
                name:'设备列表',
                router:'/device/list',
                sub:[
                    {
                        id:1,
                        name:'添加设备',
                        router:'/device/add',
                    },
                    {
                        id:3,
                        name:'绑定电子围栏',
                        router:'/device/config',
                    }
                ]
            },

        ]
    },
    {
     id:3,
     name:'电子围栏管理',
     sub:[
            {
                id:1,
                name:'围栏列表',
                router:'/rail/list',
                sub:[
                    {
                        id:1,
                        name:'添加围栏',
                        router:'/rail/add'
                    }
                ]
            },
      ]
    },
    {
        id:4,
        name:'告警管理',
        sub:[
            {
                id:1,
                name:'告警记录',
                router:'/warn/log',
            },
        ]
    },
]